<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/c.tld" prefix="c"%>

<%@ page import="java.net.URLEncoder"%>
<%@ page import="com.myspace.view.common.Constant"%>
<%@ page import="com.myspace.view.picture.ViewPictureForm"%>

<html:html locale="true" xhtml="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>查看图片</title>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/myspace.css" />
<script type="text/JavaScript" src="${pageContext.request.contextPath}/js/myspace.js"></script>
<style type="text/css">
<!--
body {
	background-color: #C9CED2;
	text-align:center;
	margin:0px;
	padding:0px;
}
-->
</style>
</head>

<%
	ViewPictureForm form = (ViewPictureForm) request.getAttribute("viewPictureForm");
%>
<body>
<div id="wrapper">
  <%@ include file="../inc/headWithNavi.jsp"%>
  <div id="body">
    <div id="content">

      <div id="leftPanel">
        <div class="box">
          <div id="titleRed">${userName} 的空间</div>
          <div id="portrait"><img src="${pageContext.request.contextPath}/image/none0000.gif" alt="Portrait" width="52" height="52" />
          <a href="#" style="position:absolute; left:115px; top:6px">更改头像</a>
          <a href="#" style="position:absolute; left:115px; top:32px">修改资料</a></div>
          <div align="center"><span class="form_text">昵 称：</span><span class="page">${userName}</span></div>
        </div>
        <div class="box" id="tag">
          <div id="titleGreen">图片标签</div>
		  <c:forEach var="tag" items="${viewPictureForm.tagList}">
			<span>
			<a href="listPicture.do?tagPage=1&tag=<%=URLEncoder.encode((String)pageContext.getAttribute("tag"),"utf-8")%>
				&userId=${viewPictureForm.userId}">
			<c:if test="${tag != viewPictureForm.tag}">${tag}</c:if>
			<c:if test="${tag == viewPictureForm.tag}"><font color="#ff0000">${tag}</font></c:if>
			</a>
			</span>
		  </c:forEach>
          <p></p>
        </div>
      </div>

      <div id="photoContainer">
        <div id="titleGreen">
	        <span style="float:left;">我的图片</span>
	        <span class="menu" style="float:right;" >
	        	<a href="#" onclick="return delPic('${viewPictureForm.picture.id}',
	        		'${viewPictureForm.userId}','${viewPictureForm.encodingTag}',
	        		'${viewPictureForm.nextPicId == -1 ? viewPictureForm.prePicId : viewPictureForm.nextPicId}')">删除图片</a>
	        </span>
        </div>
        <div style="padding-left:10px;" align="center">
			<c:if test="${viewPictureForm.picture != null}">
			  <div class="photoView" align="center">
	            <img src="<%=Constant.PIC_HOST_SERVER + form.getPicture().getOriginalPicPath()%>"/><br/>
	            <c:if test="${viewPictureForm.prePicId != -1}">
	            	<a href="viewPictureTag.do?picId=${viewPictureForm.prePicId}&tag=${viewPictureForm.encodingTag}&userId=${viewPictureForm.userId}">
	            	<img src="${pageContext.request.contextPath}/image/pageup.gif" border="0"/></a>&nbsp;&nbsp;&nbsp;&nbsp;
	            </c:if>
				<c:if test="${viewPictureForm.nextPicId != -1}">
	             	<a	href="viewPictureTag.do?picId=${viewPictureForm.nextPicId}&tag=${viewPictureForm.encodingTag}&userId=${viewPictureForm.userId}">
	             	<img src="${pageContext.request.contextPath}/image/pagedown.gif" border="0"/></a>
	            </c:if>
	          </div>
			</c:if>
        </div>
      </div>

	  <span id="copyright">Copyright © 2007-2008 Allen.Chen</span>

    </div>
  </div>

  <div id="footer">
    <div id="left"></div>
    <div id="right"></div>
  </div>

</div>
</body>
</html:html>
